<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>transition</title>
  <style>
    div {
      width: 100px;
      height: 100px;
      background-color: red;
      /* 1、规定过渡的属性名称 (none all 某属性)*/
      transition-property: width, background-color;
      /* 2、设置过渡的时长 */
      transition-duration: 5s, 1s;
      /* 3、设置过渡效果的时间曲线 快——>慢 */
      transition-timing-function: linear;
      /* 4、设置过渡的等待时长 ——2s之后再执行过渡效果*/
      transition-delay: 0.5s;
      /* 5、过渡简写 */
      transition: width 5s linear 0s, background-color 1s linear 0s;
    }

    img {
      width: 150px;
      transition: width 2s linear 0s;
    }

    img:hover {
      width: 250px;
    }

    div:hover {
      width: 500px;
      background-color: blue;
    }
  </style>
</head>

<body>
  <div></div>
  <img src="./images/ad12.jpg" alt="">

</body>

</html>